import request from '@/utils/request';

// 查询协办单位列表
export function listHostOrg(query) {
  return request({
    url: '/system/hostOrg/list',
    method: 'get',
    params: query,
  });
}

// 查询协办单位详细
export function getHostOrg(hostOrgId) {
  return request({
    url: '/system/hostOrg/' + hostOrgId,
    method: 'get',
  });
}

// 新增协办单位
export function addHostOrg(data) {
  return request({
    url: '/system/hostOrg',
    method: 'post',
    data: data,
  });
}

// 修改协办单位
export function updateHostOrg(data) {
  return request({
    url: '/system/hostOrg',
    method: 'put',
    data: data,
  });
}

// 协办单位状态修改
export function changeHostOrgStatus(hostOrgId, status) {
  const data = {
    hostOrgId,
    status,
  };
  return request({
    url: '/system/hostOrg/changeStatus',
    method: 'put',
    data: data,
  });
}

// 删除协办单位
export function delHostOrg(hostOrgId) {
  return request({
    url: '/system/hostOrg/' + hostOrgId,
    method: 'delete',
  });
}

